/*
 * JPconsultarcuentabancaria.java
 *
 * Created on 3 de julio de 2007, 10:58
 */

package pantalla;
import java.sql.*;
import utiles.*;
import java.util.ArrayList;
import java.rmi.*;
import java.rmi.registry.Registry;
import java.rmi.registry.LocateRegistry;
/**
 *
 * @author  admin
 */
public class JPconsultarcuentabancaria extends javax.swing.JPanel {
    java.awt.Point punto;
    javax.swing.JInternalFrame jif;
     String nombre_trabajador,dni,conecta[];
      
String identificador;
   
     boolean encuentra=false;
     boolean bol_guardar=false;
   
    
       
       
       
     int num_sul,posSelCod;
    Utiles_Busqueda popbuscador;

    /** Creates new form JPconsultarcuentabancaria */
    public JPconsultarcuentabancaria(String id) {
        initComponents();
        jrbCodigo.setMnemonic(java.awt.event.KeyEvent.VK_O);
        jrbNombre.setMnemonic(java.awt.event.KeyEvent.VK_M);
        jrbCuenta.setMnemonic(java.awt.event.KeyEvent.VK_U);
        jbSalir.setMnemonic(java.awt.event.KeyEvent.VK_S);
        jbBuscar.setMnemonic(java.awt.event.KeyEvent.VK_B);
        jbImprimir.setMnemonic(java.awt.event.KeyEvent.VK_I);
        identificador=id;
        punto=jtfCodigo.getLocation();
    
         String consultatt = "select p.codigo_persona, p.nombre, p.Ap_paterno, " +
                    "p.Ap_materno,' - DNI: '+p.codigo_persona from Persona p, Trabajador t where p.codigo_persona = t.dni";                
        int[] coltt = { 3, 4, 2,5 };
        popbuscador =new Utiles_Busqueda( this.jpmNombres, this.jtfCodigo, consultatt, coltt, ConsultasCliRmi.clirmi,punto.x+140,punto.y-2,identificador );
        jtCuentas.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        
    }
   
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jpmNombres = new javax.swing.JPopupMenu();
        jrbCodigo = new javax.swing.JRadioButton();
        jrbNombre = new javax.swing.JRadioButton();
        jrbCuenta = new javax.swing.JRadioButton();
        jtfCodigo = new javax.swing.JTextField();
        jbBuscar = new javax.swing.JButton();
        jpPanel1 = new javax.swing.JPanel();
        jspPanel1 = new javax.swing.JScrollPane();
        jtCuentas = new javax.swing.JTable();
        jbImprimir = new javax.swing.JButton();
        jbSalir = new javax.swing.JButton();
        jlTraba = new javax.swing.JLabel();
        jlTrabajador = new javax.swing.JLabel();

        buttonGroup1.add(jrbCodigo);
        jrbCodigo.setFont(new java.awt.Font("Arial", 0, 12));
        jrbCodigo.setSelected(true);
        jrbCodigo.setText("Codigo trabajador");
        jrbCodigo.setToolTipText("buscar por codigo");
        jrbCodigo.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jrbCodigo.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jrbCodigo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbCodigoActionPerformed(evt);
            }
        });
        jrbCodigo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jrbCodigoKeyPressed(evt);
            }
        });

        buttonGroup1.add(jrbNombre);
        jrbNombre.setFont(new java.awt.Font("Arial", 0, 12));
        jrbNombre.setText("Nombre trabajador");
        jrbNombre.setToolTipText("buscar por nombre");
        jrbNombre.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jrbNombre.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jrbNombre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbNombreActionPerformed(evt);
            }
        });
        jrbNombre.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jrbNombreKeyPressed(evt);
            }
        });

        buttonGroup1.add(jrbCuenta);
        jrbCuenta.setFont(new java.awt.Font("Arial", 0, 12));
        jrbCuenta.setText("Cuenta bancaria");
        jrbCuenta.setToolTipText("buscar por numero de cuenta");
        jrbCuenta.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
        jrbCuenta.setMargin(new java.awt.Insets(0, 0, 0, 0));
        jrbCuenta.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbCuentaActionPerformed(evt);
            }
        });
        jrbCuenta.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jrbCuentaKeyPressed(evt);
            }
        });

        jtfCodigo.setComponentPopupMenu(jpmNombres);
        jtfCodigo.setFont(new java.awt.Font("Arial", 0, 12));
        jtfCodigo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtfCodigoActionPerformed(evt);
            }
        });
        jtfCodigo.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jtfCodigoKeyReleased(evt);
            }
        });

        jbBuscar.setFont(new java.awt.Font("Arial", 0, 12));
        jbBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/fife/plaf/Office2003/find.gif"))); // NOI18N
        jbBuscar.setText("Buscar");
        jbBuscar.setToolTipText("busqueda");
        jbBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbBuscarActionPerformed(evt);
            }
        });
        jbBuscar.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jbBuscarKeyPressed(evt);
            }
        });

        jpPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Cuentas Encontradas", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Arial", 1, 12))); // NOI18N
        jpPanel1.setFont(new java.awt.Font("Arial", 1, 12));

        jspPanel1.setToolTipText("cuentas encontradas");
        jspPanel1.setFont(new java.awt.Font("Arial", 0, 12));

        jtCuentas.setFont(new java.awt.Font("Arial", 0, 16)); // NOI18N
        jtCuentas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Num. Cuenta", "Banco", "Tipo Moneda", "Tipo Cuenta", "CTS"
            }
        ));
        jspPanel1.setViewportView(jtCuentas);

        jbImprimir.setFont(new java.awt.Font("Arial", 0, 12));
        jbImprimir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/fife/plaf/Office2003/print.gif"))); // NOI18N
        jbImprimir.setText("Imprimir");
        jbImprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbImprimirActionPerformed(evt);
            }
        });
        jbImprimir.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jbImprimirKeyPressed(evt);
            }
        });

        javax.swing.GroupLayout jpPanel1Layout = new javax.swing.GroupLayout(jpPanel1);
        jpPanel1.setLayout(jpPanel1Layout);
        jpPanel1Layout.setHorizontalGroup(
            jpPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpPanel1Layout.createSequentialGroup()
                .addContainerGap(516, Short.MAX_VALUE)
                .addComponent(jbImprimir)
                .addContainerGap())
            .addComponent(jspPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 627, Short.MAX_VALUE)
        );
        jpPanel1Layout.setVerticalGroup(
            jpPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpPanel1Layout.createSequentialGroup()
                .addComponent(jbImprimir)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jspPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE))
        );

        jbSalir.setFont(new java.awt.Font("Arial", 0, 12));
        jbSalir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/fife/plaf/Office2003/close.gif"))); // NOI18N
        jbSalir.setText("Salir");
        jbSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbSalirActionPerformed(evt);
            }
        });
        jbSalir.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jbSalirKeyPressed(evt);
            }
        });

        jlTraba.setFont(new java.awt.Font("Arial", 0, 12));
        jlTraba.setText("Trabajador :");

        jlTrabajador.setFont(new java.awt.Font("Arial", 2, 12));
        jlTrabajador.setToolTipText("datos del trabajador");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jrbCodigo)
                            .addComponent(jrbCuenta)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                        .addGap(17, 17, 17)
                                        .addComponent(jlTraba)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jlTrabajador, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                        .addComponent(jrbNombre)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jtfCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 262, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(6, 6, 6)
                                .addComponent(jbBuscar)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 58, Short.MAX_VALUE)
                        .addComponent(jbSalir))
                    .addComponent(jpPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jbBuscar, jbSalir});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jrbCodigo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jrbNombre)
                    .addComponent(jtfCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbBuscar))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jrbCuenta)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlTraba)
                    .addComponent(jlTrabajador, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jpPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbSalir)
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jrbCuentaKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jrbCuentaKeyPressed
// TODO: Agrege su codigo aqui:
         if(evt.getKeyCode()==evt.VK_ENTER){
            jtfCodigo.requestFocus();
        }
    }//GEN-LAST:event_jrbCuentaKeyPressed

    private void jrbNombreKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jrbNombreKeyPressed
// TODO: Agrege su codigo aqui:
         if(evt.getKeyCode()==evt.VK_ENTER){
            jtfCodigo.requestFocus();
        }
    }//GEN-LAST:event_jrbNombreKeyPressed

    private void jrbCodigoKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jrbCodigoKeyPressed
// TODO: Agrege su codigo aqui:
         if(evt.getKeyCode()==evt.VK_ENTER){
            jtfCodigo.requestFocus();
        }
    }//GEN-LAST:event_jrbCodigoKeyPressed

    private void jbBuscarKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jbBuscarKeyPressed
// TODO: Agrege su codigo aqui:
        if(evt.getKeyCode()==evt.VK_ENTER){
            jbBuscar.doClick();
        }
    }//GEN-LAST:event_jbBuscarKeyPressed

    private void jbSalirKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jbSalirKeyPressed
// TODO: Agrege su codigo aqui:
          if(evt.getKeyCode()==evt.VK_ENTER){
            jbSalir.doClick();
        }
    }//GEN-LAST:event_jbSalirKeyPressed

    private void jbImprimirKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jbImprimirKeyPressed
// TODO: Agrege su codigo aqui:
          if(evt.getKeyCode()==evt.VK_ENTER){
            jbImprimir.doClick();
        }
    }//GEN-LAST:event_jbImprimirKeyPressed

    private void jrbNombreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbNombreActionPerformed
// TODO add your handling code here:
        this.popbuscador.activarBusqueda(true);
    }//GEN-LAST:event_jrbNombreActionPerformed

    private void jrbCuentaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbCuentaActionPerformed
// TODO add your handling code here:
        this.popbuscador.activarBusqueda(false);
    }//GEN-LAST:event_jrbCuentaActionPerformed

    private void jbImprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbImprimirActionPerformed
// TODO add your handling code here:try{
        try{
            utiles.imprimir.tabla(jtCuentas,true,"Cuentas Bancarias del trabajador "+jlTrabajador.getText().trim(),"");
           
        }catch(Exception e){
            mensaje("Error en la impresion\n"+e.toString());
        }
    }//GEN-LAST:event_jbImprimirActionPerformed

    private void jtfCodigoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtfCodigoActionPerformed
// TODO add your handling code here:
         if(jrbCuenta.isSelected()){
            buscacuentas();
        }else{ 
             if(this.popbuscador.getIndicadorBusqueda()){
        if(this.popbuscador.getHizoEnter())
        busquedatrabajador();
        }
        else{
            busquedatrabajador();
        }
        }
    }//GEN-LAST:event_jtfCodigoActionPerformed

    private void jbSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbSalirActionPerformed
// TODO add your handling code here:
        cerrar();
    }//GEN-LAST:event_jbSalirActionPerformed
 
    public   void cerrar(){
          int res = javax.swing.JOptionPane.showConfirmDialog( this,"Esta seguro de salir?",
      "Confirmar",javax.swing.JOptionPane.YES_NO_OPTION );
         if(res==javax.swing.JOptionPane.YES_OPTION){
                  jif.dispose();
         }
      }
    private void jtfCodigoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtfCodigoKeyReleased
// TODO add your handling code here:
        
    }//GEN-LAST:event_jtfCodigoKeyReleased


 
 private void jbBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbBuscarActionPerformed
// TODO add your handling code here:
         if(jrbCuenta.isSelected()){
            buscacuentas();
        }else{
            busquedatrabajador();
        }
 }//GEN-LAST:event_jbBuscarActionPerformed
 public void mensaje(String mens){
         javax.swing.JOptionPane.showMessageDialog( this,mens,
      "Mensaje de Informacion",javax.swing.JOptionPane.ERROR_MESSAGE);
    }
     void busquedatrabajador(){
          String nomaux="";
          int cosaux=1;
       if( this.jrbCodigo.isSelected() ){
            this.posSelCod = this.popbuscador.buscaClave( this.jtfCodigo.getText().trim() );
            ArrayList araux=ConsultasCliRmi.consulta("select  p.Ap_paterno +' '" +
                    "+ p.Ap_materno + ' '+ p.nombre from Persona p where p.codigo_persona = '"+this.jtfCodigo.getText().trim()+"'",identificador);
           cosaux=araux.size()-2;
           try{
               nomaux=((ArrayList)araux.get(0)).get(0).toString().trim();
           }catch(Exception e){}
          
        }else if( this.jrbNombre.isSelected() ){
            this.posSelCod = this.popbuscador.getIndice();
            nomaux=this.jtfCodigo.getText().trim();
        }
        
          if(cosaux<1){
              Utiles_MensajesDialogo.mensajeAlerta( "No se encuenta el Trabajador" );
              return;
          }
        if( (this.posSelCod == -1 || !this.popbuscador.getHizoEnter() ) && !jrbCodigo.isSelected() ){
            Utiles_MensajesDialogo.mensajeAlerta( "No se encuenta el Trabajador" );
            jtCuentas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Num. Cuenta", "Banco", "Tipo Moneda", "Tipo Cuenta", "CTS"
            }
        ));
            
            
        }else{
           
           jlTrabajador.setText(nomaux);
           dni=this.popbuscador.getSoloClave(posSelCod).toString().trim();
           jtCuentas.setModel(ConsultasCliRmi.llenatabla("select id_cuenta_bancaria as [Num. Cuenta],banco.nom_banco as [Banco]," +
                        "tipo_moneda.nom_moneda as [Tipo Moneda] ,tipo_cuenta.nom_tipo_cta as [Tipo Cuenta],flag_cts as [CTS] from " +
                        "cuenta_bancaria inner join banco on cuenta_bancaria.id_banco= banco.id_banco " +
                        "inner join tipo_moneda on cuenta_bancaria.tipo_mon_corr =tipo_moneda.tipo_mon_corr " +
                        "inner join tipo_cuenta on cuenta_bancaria.corr_tipo_cta= tipo_cuenta.corr_tipo_cta" +
                        " where DNI='"+dni+"'",identificador));
          
        }
    }
 
  void buscacuentas(){
           String nomaux="",nomaux1="";
   
      
            this.posSelCod = this.popbuscador.buscaClave( this.jtfCodigo.getText().trim() );
            ArrayList araux=ConsultasCliRmi.consulta("select DNI,id_cuenta_bancaria as [Num. Cuenta],id_banco as [Banco]," +
                        "tipo_mon_corr as [Tipo Moneda] ,corr_tipo_cta as [Tipo Cuenta],flag_cts as [CTS] " +
                    "from cuenta_bancaria where  id_cuenta_bancaria='"+jtfCodigo.getText().trim()+"'",identificador);
            try{
            nomaux=((ArrayList)araux.get(0)).get(0).toString();
            ArrayList araux1=ConsultasCliRmi.consulta("select  p.Ap_paterno +' '" +
                    "+ p.Ap_materno + ' '+ p.nombre from Persona p where p.codigo_persona = '"+nomaux+"'",identificador);
            nomaux1=((ArrayList)araux1.get(0)).get(0).toString();
            }catch(NullPointerException e){
                 Utiles_MensajesDialogo.mensajeAlerta("La cuenta no le pertenece a un trabajador");
                 nomaux="";
            }
        
           
        if( (araux.size()-2)<1 ){
            Utiles_MensajesDialogo.mensajeAlerta( "No se encuenta la cuenta" );
            jtCuentas.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Num. Cuenta", "Banco", "Tipo Moneda", "Tipo Cuenta", "CTS"
            }
        ));
            
        }else{
           
           jlTrabajador.setText(nomaux1);
       
           jtCuentas.setModel(ConsultasCliRmi.llenatabla("select id_cuenta_bancaria as [Num. Cuenta],banco.nom_banco as [Banco]," +
                        "tipo_moneda.nom_moneda as [Tipo Moneda] ,tipo_cuenta.nom_tipo_cta as [Tipo Cuenta],flag_cts as [CTS] from " +
                        "cuenta_bancaria inner join banco on cuenta_bancaria.id_banco= banco.id_banco " +
                        "inner join tipo_moneda on cuenta_bancaria.tipo_mon_corr =tipo_moneda.tipo_mon_corr " +
                        "inner join tipo_cuenta on cuenta_bancaria.corr_tipo_cta= tipo_cuenta.corr_tipo_cta " +
                        "where  id_cuenta_bancaria='"+jtfCodigo.getText().trim()+"'",identificador));
          
        }    
    }
  private void jrbCodigoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbCodigoActionPerformed
// TODO add your handling code here:
      this.popbuscador.activarBusqueda(false);
  }//GEN-LAST:event_jrbCodigoActionPerformed
    
     public  void ponerancestro(javax.swing.JInternalFrame jjj){
        jif=jjj;
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jbBuscar;
    private javax.swing.JButton jbImprimir;
    private javax.swing.JButton jbSalir;
    private javax.swing.JLabel jlTraba;
    private javax.swing.JLabel jlTrabajador;
    private javax.swing.JPanel jpPanel1;
    private javax.swing.JPopupMenu jpmNombres;
    private javax.swing.JRadioButton jrbCodigo;
    private javax.swing.JRadioButton jrbCuenta;
    private javax.swing.JRadioButton jrbNombre;
    private javax.swing.JScrollPane jspPanel1;
    private javax.swing.JTable jtCuentas;
    private javax.swing.JTextField jtfCodigo;
    // End of variables declaration//GEN-END:variables
    
}
